import Taro, { Component } from '@tarojs/taro'
import {View,Text,Image} from '@tarojs/components'
import './index.css'
import { AtInput, AtForm,AtTag ,AtSearchBar} from 'taro-ui'
import {$navigateTo} from '../../../global'
import app from '../../../main.js'

export default class index extends Component {
  config = {
    navigationBarTitleText: '搜索'
  }
  sousuojieguo=()=>{
    $navigateTo("../sousuojieguo/index");
}

  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }
  constructor () {
    super(...arguments)
    this.state = {
      value: ''
    }
  }
  handleChange (value) {
    this.setState({
      value:value
    })
  }
  onActionClick () {
    console.log('开始搜索')
  }
  render () {
    return (
    <View className='index'>
      <View><AtSearchBar onActionClick={this.sousuojieguo}
        value={this.state.value}
        onChange={this.onChange.bind(this)}
      />
  </View>
  <View className='a'><text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;搜索历史</text>
  <View className='c' onClick={this.sousuojieguo}><AtTag type='primary' circle>干眼症</AtTag>
<AtTag  type='primary' circle>散光</AtTag>
<AtTag  type='primary' circle>近视</AtTag>
<AtTag  type='primary' circle>小儿与遗传眼病</AtTag>
</View>
</View>
<View><text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;热搜词</text>
  <View className='b' onClick={this.sousuojieguo}><AtTag  type='primary' circle>干眼症</AtTag>
<AtTag  type='primary' circle>散光</AtTag>
<AtTag  type='primary' circle>色盲</AtTag>
<AtTag  type='primary' circle>近视</AtTag>
<AtTag  type='primary' circle>青光眼</AtTag>
<AtTag  type='primary' circle>白内障</AtTag>
<AtTag  type='primary' circle>结膜炎</AtTag>
<AtTag  type='primary' circle>角膜炎</AtTag>
<AtTag  type='primary' circle>眼外伤</AtTag>
<AtTag  type='primary' circle>小儿与遗传眼病</AtTag>
</View>
</View>
    </View>
    )
    
  }
  

}

